package xyz.yeidi.service.api;

import xyz.yeidi.pojo.Orders;

import java.util.List;

/**
 * @Author JIP
 * @Date 2021-08-07 15:22
 * @Version 1.0
 * @Describe :
 */
public interface OrdersService {
    //添加订单
    public boolean addOrders(Orders orders);

    //通过id查询订单
    public Orders getOrdersById(Integer id);

    //通过id删除订单
    public boolean deleteOrdersById(Integer id);

    //通过用户id查询订单
    public List<Orders> getOrdersByUserId(Integer userId);

    //通过商家id查询订单
    public List<Orders> getOrdersByBusinessId(Integer businessId);

    //通过用户id查询到一个最近添加的orderId
    public Integer getOrderIdByUserId(Integer userId);
}
